//
//  NetRequestCenter.m
//  supplyerIOS
//
//  Created by UaenaMo on 2018/5/11.
//  Copyright © 2018年 UaenaMo. All rights reserved.
//

#import "NetRequestCenter.h"
#import <AFNetworking.h>
@implementation NetRequestCenter

#pragma mark - 用户账号登录
+(void)loginWithName:(NSString *)name password:(NSString *)password result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/login"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"name":name,@"password":password} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            NSString * cookie = [[resultDic objectForKey:@"data"]objectForKey:@"token"];
            [[NSUserDefaults standardUserDefaults]setObject:cookie forKey:@"token"];
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 用户注册
+(void)registerWithName:(NSString *)name password:(NSString *)password mobilecode:(NSString *)mobileCode province:(NSString *)province city:(NSString *)city checktype:(int)checkType result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/register"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    NSDictionary * parameter;
    if (checkType == 1)
    {
        parameter = @{@"name":name,@"mobilecode":mobileCode,@"checktype":@1,@"password":password,@"province":province,@"city":city};
    }
    else
    {
        parameter = @{@"name":name,@"mobilecode":mobileCode,@"checktype":@0};
    }
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@100])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 用户登出
+(void)logoutWithResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/logout"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            [[NSUserDefaults standardUserDefaults]removeObjectForKey:@"cookie"];
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - QQ三方登录
+(void)qqloginWithOpenid:(NSString *)openid nickname:(NSString *)nickname sex:(NSString *)sex pic:(NSString *)pic province:(NSString *)province city:(NSString *)city result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/oauth_qq"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager POST:requestUrl parameters:@{@"openid":openid,@"nickname":nickname,@"sex":sex,@"pic":pic,@"province":province,@"city":city} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            NSString * cookie = [[resultDic objectForKey:@"data"]objectForKey:@"token"];
            [[NSUserDefaults standardUserDefaults]setObject:cookie forKey:@"cookie"];
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 微信三方登录
+(void)wechatLoginWithProvince:(NSString *)province city:(NSString *)city openid:(NSString *)openid unionid:(NSString *)unionid accesstoken:(NSString *)accesstoken  result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/oauth_wechat"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    NSDictionary * parameter = @{@"accessToken":accesstoken,@"province":province,@"city":city,@"openId":openid,@"unionId":unionid};
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            NSString * cookie = [[resultDic objectForKey:@"data"]objectForKey:@"token"];
            [[NSUserDefaults standardUserDefaults]setObject:cookie forKey:@"cookie"];
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 登录状态校验
+(void)logoutStatusResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/loginstatus"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];

    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        
        NSString * results = [[NSString alloc]initWithData:responseObject encoding:NSUTF8StringEncoding];

        if ([results isEqualToString:@"true"])
        {
            result(YES,nil);
        }
        else
        {
            result(NO, nil);
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 忘记密码
+(void)changePasswordWithS:(NSString *)s mobile:(NSString *)mobile password:(NSString *)password captcha:(NSString *)captcha checktype:(NSString *)checktype result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/forgot"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"s":s,@"mobile":mobile,@"password":password,@"captcha":captcha,@"checktype":checktype};
    
    [manager POST:requestUrl parameters:@{@"s":s,@"mobile":mobile,@"password":password,@"captcha":captcha,@"checktype":checktype} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[NSString stringWithFormat:@"%@",[resultDic objectForKey:@"status"]]isEqualToString:@"0"])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 修改密码
+(void)changePasswordWitholdpwd:(NSString *)oldpwd newpassword:(NSString *)newpassword result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/changepass"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"oldpwd":oldpwd,@"newpwd":newpassword} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 三方账号绑定手机号
+(void)bindMobileWithMobile:(NSString *)mobile password:(NSString *)password name:(NSString *)name checkType:(NSString *)checktype result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/bindmobile"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"mobilecode":mobile,@"password":password,@"name":name,@"checktype":checktype} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 读取个人资料
+(void)userInfoResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/userinfo"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 修改个人资料
+(void)updateUserInfoWIthheadpic:(NSString *)headpic nickname:(NSString *)nickname sex:(NSString *)sex birthday:(NSString *)birthday identify:(NSString *)identify identify2:(NSString *)identify2 school:(NSString *)school company:(NSString *)company province:(NSString *)province city:(NSString *)city district:(NSString *)district jobpush:(NSString *)jobpush intro:(NSString *)intro ecname:(NSString *)ecname ecrelationship:(NSString *)ecrelationship ecphone:(NSString *)ecphone result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/userinfo"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    NSDictionary * parameter = @{@"headpic":headpic,
                                 @"nickname":nickname,
                                 @"sex":sex,
                                 @"birthday":birthday,
                                 @"identify1":identify,
                                 @"identify2":identify2,
                                 @"school":school,
                                 @"company":company,
                                 @"province":province,
                                 @"city":city,
                                 @"district":district,
                                 @"jobpush":jobpush,
                                 @"intro":intro,
                                 @"ecname":ecname,
                                 @"ecrelationship":ecrelationship,
                                 @"ecphone":ecphone};
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 增加个人能力
+(void)addabilityWithClassid:(NSString *)classid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/adduserability"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除个人能力
+(void)removeabilityWithClassid:(NSString *)classid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/deluserability"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 打开可出售个人能力页面
+(void)soldabilityResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/soldability"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 增加可出售个人能力
+(void)addsoldabilityWithClassid:(NSString *)classid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/addsoldability"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除可出售个人能力
+(void)removesoldabilityWithClassid:(NSString *)classid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/deletesoldability"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 获取实名认证状态
+(void)shimingResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/shimingstatus"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 提交实名认证
+(void)commitshimingWithName:(NSString *)name num:(NSString *)num idpichand:(NSString *)idpichand idpicfront:(NSString *)idpicfront idpicback:(NSString *)idpicback licensename:(NSString *)licensename licenseid:(NSString *)licenseid licensepic:(NSString *)licensepic result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/commitshiming"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"name":name,
                                          @"num":num,
                                          @"idpichand":idpichand,
                                          @"idpicfront":idpicfront,
                                          @"idpicback":idpicback,
                                          @"licensename":licensename,
                                          @"licenseid":licenseid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 获取所有消息列表
+(void)messagelistResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/messagelist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 查看未读消息数量
+(void)messageStatusResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/msgstatus"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 手机账号解除绑定三方账号
+(void)oauthunbindWithType:(NSString *)type result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/oauthunbind"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"type":type} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                                              NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
                                              
                                              if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
                                              {
                                                  
                                                  result(YES,resultDic);
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":[resultDic objectForKey:@"content"]});
                                              }
                                              
                                          } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                                              if ([error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"])
                                              {
                                                  NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:[error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"] options:NSJSONReadingMutableLeaves error:nil];
                                                  result(NO,@{@"message":[resultDic objectForKey:@"error"]});
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":@"网络连接失败"});
                                              }
                                          }];
}


#pragma mark - 检查系统版本号
+(void)checkversionResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/checkversion"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 生成图形验证码
+(void)makecaptchaResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/makecaptcha"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToString:@"0"])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 生成手机短信验证码
+(void)makemobilecode:(NSString *)to captcha:(NSString *)captcha Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/makemobilecode"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"to":to,@"captcha":captcha} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqual:@"0"])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 能力类别
+(void)abilityclassWithClassid:(NSString *)classid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/abilityclass"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 能力类别1
+(void)reqabilityclassWithClassid:(NSString *)classid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getJobAbilityClass"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:@{@"classId":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        result(NO,@{@"message":@"网络连接失败"});
        
    }];
}

#pragma mark - 活动类别
+(void)activityclassWithClassid:(NSString *)classid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityclass"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"classid":classid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 首页数据
+(void)homeResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 技能售卖
+(void)telentShowwithtaskname:(NSString *)name type:(NSString *)type classid:(NSString *)classid onoffine:(NSString *)onoffline page:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/talentshow"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"taskname":name,@"type":type,@"classid":classid,@"onoffline":onoffline,@"page":page} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 需求发布
+(void)demandshowwithtaskname:(NSString *)name type:(NSString *)type classid:(NSString *)classid onoffine:(NSString *)onoffline page:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demandshow"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"taskname":name,@"type":type,@"classid":classid,@"onoffline":onoffline,@"page":page} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 公益活动
+(void)activitygongyishowwithtaskname:(NSString *)name type:(NSString *)type classid:(NSString *)classid onoffine:(NSString *)onoffline page:(NSString *)page addressid:(NSString *)addressid property:(NSString *)property zuzhixingshi:(NSString *)zuzhixingshi cityname:(NSString *)cityname Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activitygongyishow"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"taskname":name,@"type":type,@"classid":classid,@"onoffline":onoffline,@"page":page,@"addressid":addressid,@"property":property,@"zuzhixingshi":zuzhixingshi,@"cityname":cityname};
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 招聘
+(void)activityjobwithtaskname:(NSString *)name type:(NSString *)type classid:(NSString *)classid onoffine:(NSString *)onoffline page:(NSString *)page addressid:(NSString *)addressid companytaskproperty:(NSString *)companytaskproperty companyproperty:(NSString *)companyproperty cityname:(NSString *)cityname tagid:(NSArray * )tagid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityjob"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"taskname":name,@"type":type,@"classid":classid,@"onoffline":onoffline,@"page":page,@"addressid":addressid,@"property":companytaskproperty,@"zuzhixingshi":companyproperty,@"cityname":cityname,@"tagId":tagid};
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}



#pragma mark - 切换城市
+(void)changecitywithid:(NSString *)cityid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/changecity"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"id":cityid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}



#pragma mark - 获取城市列表
+(void)citylistResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/citylist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 根据城市ID获取所辖地区信息
+(void)districtlistWithCid:(NSString *)ciod Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/districtlist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"id":ciod} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 读取个人电子档案
+(void)loadpersonalarchiveWityType:(NSString *)type property:(NSString *)property ordrebase:(NSString *)orderbase orderrule:(NSString *)orderrule page:(NSString *)page time:(NSString *)time nexttime:(NSString *)nexttime showtype:(NSString *)showtype uid:(NSString *)uid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/loadpersonalarchive"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"type":type,
                                 @"property":property,
                                 @"orderbase":orderbase,
                                 @"orderrule":orderrule,
                                 @"page":page,
                                 @"time":time,
                                 @"nexttime":nexttime,
                                 @"showtype":showtype,
                                 @"uid":uid};
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 发布个人电子档案
+(void)personalarchiveWithType:(NSString *)type eventime:(NSString *)eventtime title:(NSString *)title content:(NSString *)content pic:(NSArray *)pic showtype:(NSString *)showtype property:(NSString *)property result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/personalarchive"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter;
        parameter = @{@"type":type,
                      @"eventtime":eventtime,
                      @"title":title,
                      @"content":content,
                      @"pic":pic,
                      @"showtype":showtype,
                      @"property":property};
    
    NSLog(@"%@",parameter);
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除个人电子档案
+(void)personalarchiveWithid:(NSString *)archiveid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/deletearchive"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"archivesuid":archiveid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                                              NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
                                              
                                              if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
                                              {
                                                  
                                                  result(YES,resultDic);
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":[resultDic objectForKey:@"content"]});
                                              }
                                              
                                          } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                                              if ([error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"])
                                              {
                                                  NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:[error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"] options:NSJSONReadingMutableLeaves error:nil];
                                                  result(NO,@{@"message":[resultDic objectForKey:@"error"]});
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":@"网络连接失败"});
                                              }
                                          }];
}

#pragma mark - 修改个人电子档案可见形式
+(void)editarchiveshowtypeWithid:(NSString *)archiveid showtype:(NSString *)showtype result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/editarchiveshowtype"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"archivesuid":archiveid,@"showtype":showtype} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 获取个人电子档案的历史时间列表按照月份排列
+(void)archivetimelistResult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/archivetimelist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                                             NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
                                             
                                             if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
                                             {
                                                 result(YES,resultDic);
                                             }
                                             else
                                             {
                                                 result(NO,@{@"message":[resultDic objectForKey:@"content"]});
                                             }
                                         } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                                             if ([error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"])
                                             {
                                                 NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:[error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"] options:NSJSONReadingMutableLeaves error:nil];
                                                 result(NO,@{@"message":[resultDic objectForKey:@"error"]});
                                             }
                                             else
                                             {
                                                 result(NO,@{@"message":@"网络连接失败"});
                                             }
                                         }];
}

#pragma mark - 好友列表
+(void)getfrlistWithFriendName:(NSString *)friendName page:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getfrlist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"friendname":friendName,@"page":page} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 申请添加好友
+(void)makefriendWithpage:(NSString *)page friendname:(NSString *)friendname uid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/makefriend"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除好友
+(void)delfriendWithpage:(NSString *)page friendname:(NSString *)friendname uid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delfriend"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 同意/拒绝添加好友
+(void)agreefrienduid:(NSString *)uid type:(NSString *)type result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/agreefriend"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid,@"type":type} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 尚未通过申请的好友列表
+(void)unagreefriendlistwithPage:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/unagreefriendlist?page=%@",page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 人才收藏列表
+(void)getppfavoritelistwithPage:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getppfavoritelist?page=%@",page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 添加收藏人才
+(void)favoritepeopleuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/favoritepeople"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除收藏的人才
+(void)delfavoritepeopleuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delfavoritepeople"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 企业收藏列表
+(void)getccfavoritelistwithPage:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getccfavoritelist?page=%@",page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 添加收藏企业
+(void)favoritecompanyuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/favoritecompany"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    NSLog(@"%@",@{@"uid":uid});
    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除收藏的企业
+(void)delfavoritecompanyuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delfavoritecompany"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 活动收藏列表
+(void)getaafavoritelistwithPage:(NSString *)page type:(NSString *)type Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getaafavoritelist?page=%@&type=%@",page,type];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 添加收藏活动
+(void)favoriteactivityuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/favoriteactivity"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除收藏的活动
+(void)delfavoriteactivityuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delfavoriteactivity"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}



#pragma mark - 报名 课程 需求 活动
+(void)enrollwithw1:(NSString *)w1 w2:(NSString *)w2 w3:(NSString *)w3 w4:(NSString *)w4 w5:(NSString *)w5 w6:(NSString *)w6 w7:(NSString *)w7 beginday:(NSString *)beginday endday:(NSString *)endday taskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/enroll"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid,@"w1":w1,@"w2":w2,@"w3":w3,@"w4":w4,@"w5":w5,@"w6":w6,@"w7":w7,@"beginday":beginday,@"endday":endday} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 报名 课程 需求 活动
+(void)evaluateenrollerwithtaskid:(NSString *)taskid receiveruid:(NSString *)receiveruid type:(NSString *)type description:(NSString *)description result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/evaluateenroller"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid,@"receiveruid":receiveruid,@"type":type,@"description":description} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 全部好评 评价参与者。 包括：课程 需求 活动
+(void)evaluateenrollerallwithtaskid:(NSString *)taskid receiveruid:(NSString *)receiveruid type:(NSString *)type description:(NSString *)description result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/evaluateenrollerall"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid,@"receiveruid":receiveruid,@"type":type,@"description":description} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 同意或者拒绝报名 包括：课程 需求 活动
+(void)agreeenrollwithid:(NSString *)sid type:(NSString *)type reason:(NSString *)reason result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/agreeenroll"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"id":sid,@"type":type,@"reason":reason} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 我发布的课程列表
+(void)lessonlistwithPage:(NSString *)page uid:(NSString *)uid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/lessonlist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter;
    if (uid) {
        parameter = @{@"page":page,@"uid":uid};
    }
    else
    {
        parameter = @{@"page":page};
    }
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 发布课程
+(void)publiclessonwithClassid:(NSString *)classid begintime:(NSString *)begintime endtime:(NSString *)endtime beginday:(NSString *)beginday endday:(NSString *)endday w7:(NSString *)w7 w6:(NSString *)w6 w4:(NSString *)w4 w3:(NSString *)w3 w2:(NSString *)w2 w1:(NSString *)w1 showtype:(NSString *)showtype onoffline:(NSString *)onoffline addressid:(NSString *)addressid payment:(NSString *)payment style:(NSString *)style w5:(NSString *)w5 result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/publiclesson"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"classid":classid,@"begintime":begintime,@"endtime":endtime,@"beginday":beginday,@"endday":endday,@"w7":w7,@"w6":w6,@"w4":w4,@"w3":w3,@"w2":w2,@"w1":w1,@"showtype":showtype,@"onoffline":onoffline,@"addressid":addressid,@"payment":payment,@"style":style,@"w5":w5};
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
            result(NO,@{@"message":@"网络连接失败"});
    }];
}

#pragma mark - 课程详情
+(void)lessondetailwithtaskid:(NSString *)taskid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/lessondetail"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {

            result(NO,@{@"message":@"网络连接失败"});
    }];
}


#pragma mark - 参与的课程页
+(void)lessonjoinlistpage:(NSString *)page Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/lessonjoinlist?page=%@",page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 我发布的需求列表
+(void)demandlistpage:(NSString *)page uid:(NSString *)uid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demandlist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter;
    if (uid) {
        parameter = @{@"page":page,@"uid":uid};
    }
    else
    {
        parameter = @{@"page":page};
    }
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}



#pragma mark - 发布需求
+(void)publicdemandwithClassid:(NSString *)classid begintime:(NSString *)begintime endtime:(NSString *)endtime beginday:(NSString *)beginday endday:(NSString *)endday w7:(NSString *)w7 w6:(NSString *)w6 w4:(NSString *)w4 w3:(NSString *)w3 w2:(NSString *)w2 w1:(NSString *)w1 showtype:(NSString *)showtype onoffline:(NSString *)onoffline addressid:(NSString *)addressid payment:(NSString *)payment style:(NSString *)style w5:(NSString *)w5 result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/publicdemand"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    
    NSDictionary * parameter = @{@"classid":classid,@"begintime":begintime,@"endtime":endtime,@"beginday":beginday,@"endday":endday,@"w7":w7,@"w6":w6,@"w4":w4,@"w3":w3,@"w2":w2,@"w1":w1,@"showtype":showtype,@"onoffline":onoffline,@"addressid":addressid,@"payment":payment,@"style":style,@"w5":w5};
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 上架/下架需求和技能
+(void)demandlessonofwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demandlessonoff"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除需求/课程
+(void)demandlessondeletewithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demandlessondelete"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 需求详情
+(void)demanddetailwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demanddetail?taskid=%@",taskid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {

            result(NO,@{@"message":@"网络连接失败"});
    }];
}

#pragma mark - 参与的需求
+(void)demandjoinlistwithuid:(NSString *)uid page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/demandjoinlist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 参与的活动
+(void)activityjoinlistwithType:(NSString *)type page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityjoinlist?type=%@&page=%@",type,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 我发布的活动列表
+(void)activitylistwithuid:(NSString *)uid page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activitylist"];

    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter;
    if (uid) {
        parameter = @{@"page":page,@"uid":uid};
    }
    else
    {
        parameter = @{@"page":page};
    }
    
    [manager GET:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 发布活动
+(void)publicactivityWithuid:(NSString *)uid classid:(NSString *)classid title:(NSString *)title pic:(NSString *)pic peoplenum:(NSString *)peoplenum begintime:(NSString *)begintime endtime:(NSString *)endtime deadtime:(NSString *)deadtime showtype:(NSString *)showtype onoffline:(NSString *)onoffline addressid:(NSString *)addressid addressdetail:(NSString *)addressdetail description:(NSString *)description demand:(NSString *)demand class:(NSString *)class payment:(NSString *)payment paymentarg:(NSString *)paymentarg type:(NSString *)type specialwelf:(NSString *)specialwf jobtitle:(NSString *)jobtype result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/publicactivity"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"uid":uid,
                                 @"classid":classid,
                                 @"title":title,
                                 @"pic":pic,
                                 @"peoplenum":peoplenum,
                                 @"begintime":begintime,
                                 @"endtime":endtime,
                                 @"deadtime":deadtime,
                                 @"showtype":showtype,
                                 @"onoffline":onoffline,
                                 @"addressid":addressid,
                                 @"addressdetail":addressdetail,
                                 @"description":description,
                                 @"demand":demand,
                                 @"class":class,
                                 @"payment":payment,
                                 @"paymentarg":paymentarg,
                                 @"type":type,
                                 @"specialwelfare":specialwf,
                                 @"jobtype":jobtype};
    
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 活动详情
+(void)activitydetailwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activitydetail?taskid=%@",taskid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 上架/下架活动
+(void)activityoffwithtaskid:(NSString *)taskid reason:(NSString *)reason result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityoff"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid,@"reason":reason} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 终止/开启报名
+(void)activityendenrollwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityendenroll"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 删除活动
+(void)activitydeletewithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activitydelete"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 活动过期后屏蔽/解除屏蔽浏览
+(void)activitydenyviewwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activitydenyview"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 活动过期后屏蔽/解除屏蔽浏览
+(void)companyEnrollWithid:(NSString *)iid touid:(NSString *)touid name:(NSString *)name sex:(NSString *)sex phone:(NSString *)phone province:(NSString *)province city:(NSString *)city district:(NSString *)district companypersonal:(NSString *)companypersonal address:(NSString *)address brief:(NSString *)brief applyreason:(NSString *)applyreason useridtype:(NSString *)useridtype userhighdegree:(NSString *)userhighdegree companyproperty:(NSString *)companyproperty companyhangye:(NSString *)companyhangye result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companyenroll"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    NSDictionary * parameter = @{@"id":touid,
                                 @"touid":iid,
                                 @"name":name,
                                 @"sex":sex,
                                 @"phone":phone,
                                 @"province":province,
                                 @"city":city,
                                 @"district":district,
                                 @"companypersonal":companypersonal,
                                 @"address":address,
                                 @"brief":brief,
                                 @"applyreason":applyreason,
                                 @"useridtype":useridtype,
                                 @"userhighdegree":userhighdegree,
                                 @"companyproperty":companyproperty,
                                 @"companyhangye":companyhangye};
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 提交活动图片
+(void)activityphotowithtaskid:(NSString *)tid pic:(NSArray *)pic result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityphoto"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"id":tid,@"pic":pic} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 插入活动图片页面
+(void)activityphotowithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/activityphoto?taskid=%@",taskid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 申请单条任务的json详情
+(void)detailjsonwithtaskid:(NSString *)taskid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/detailjson?taskid=%@",taskid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 获取活动 需求 技能的报名列表
+(void)getenrolllistwithtaskid:(NSString *)taskid page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/getenrolllist?taskid=%@&page=%@",taskid,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 个人主页
+(void)personalwithtaskid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/personal?uid=%@",uid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 打开个人评价页面
+(void)evaluatewithtaskid:(NSString *)uid type:(NSString *)type d:(NSString *)d page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/evaluate?uid=%@&type=%@&d=%@&page=%@",uid,type,d,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 企业主页
+(void)companycenterwithtaskid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companycenter?uid=%@",uid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 故事品牌
+(void)storyBrandWithUid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://www.xrsquare.com/v180615/companyHistory?uid=%@",uid];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        result(NO,@{@"message":@"网络连接失败"});
        
    }];
}

#pragma mark - 评价页面
+(void)companyevaluatewithtype:(NSString *)type d:(NSString *)d page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companyevaluate?type=%@&d=%@&page=%@",type,d,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 活动列表
+(void)companyactivitylistwithuid:(NSString *)uid page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companyactivitylist?uid=%@&page=%@",uid,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 招聘列表
+(void)companyjoblistwithuid:(NSString *)uid page:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companyjoblist?uid=%@&page=%@",uid,page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 获取企业成长历程json返回
+(void)companyarchivejsonwithuid:(NSString *)uid page:(NSString *)page orderrule:(NSString *)orderrule orderbase:(NSString *)orderbase type:(NSString *)type result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/companyarchivejson"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"type":type,@"orderbase":orderbase,@"orderrule":orderrule,@"page":page,@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 获取未读私信状态
+(void)unreadstatusresult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/unreadstatus"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 写私信
+(void)writeprivatewithuid:(NSString *)uid content:(NSString *)content result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/writeprivate"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid,@"content":content} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 获取私信列表
+(void)privatelistwithpage:(NSString *)page result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/privatelist?page=%@",page];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 删除私信
+(void)delprivatewithuid:(NSString *)uid groupid:(NSString *)groupid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delprivate"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    NSDictionary * parameter = @{@"id":uid};
    NSLog(@"%@",parameter);
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 删除消息
+(void)delmessagewithuid:(NSArray *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/delmessage"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    NSDictionary * parameter = @{@"uid":uid};
    NSLog(@"%@",parameter);
    
    [manager POST:requestUrl parameters:parameter progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {

            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        result(NO,@{@"message":@"网络连接失败"});
        
    }];
}

#pragma mark - 私信详情
+(void)privatedetailwithgroupid:(NSString *)groupid tid:(NSString *)tid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/privatedetail"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"groupid":groupid,@"id":tid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 新闻列表
+(void)newswithtype:(NSString *)type age:(NSString *)age page:(NSString *)page searchcontent:(NSString *)searchcontent result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/news"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"type":type,@"age":age,@"page":page,@"searchcontent":searchcontent} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 新闻类别列表
+(void)newstyperesult:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/newstype"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 新闻详情
+(void)newsdetailwithid:(NSString *)tid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/newsdetail"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"id":tid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 提交建议/投诉内容
+(void)delprivatewithtitle:(NSString *)title content:(NSString *)content result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/suggest"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"title":title,@"content":content} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 获取七牛上传uptoken
+(void)uptokenwithbucket:(NSString *)bucket result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/qiniu/uptoken"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"bucket":bucket} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 七牛私密空间图片链接获取
+(void)seceretpicWithfilename:(NSString *)filename result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/qiniu/seceretpic"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"filename":filename} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 提报名加入企业或组织的申请
+(void)oauthunbindwithid:(NSString *)tid touid:(NSString *)touid name:(NSString *)name sex:(NSString *)sex phone:(NSString *)phone province:(NSString *)province city:(NSString *)city district:(NSString *)district companypersonal:(NSString *)companypersonal address:(NSString *)address brief:(NSString *)brief applyreason:(NSString *)applyreason useridtype:(NSString *)useridtype userhighdegree:(NSString *)userhighdegree companyproperty:(NSString *)companyproperty companyhangye:(NSString *)companyhangye result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/oauthunbind"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"id":tid,
                                          @"touid":touid,
                                          @"name":name,
                                          @"sex":sex,
                                          @"phone":phone,
                                          @"province":province,
                                          @"city":city,
                                          @"district":district,
                                          @"companypersonal":companypersonal,
                                          @"address":address,
                                          @"brief":brief,
                                          @"applyreason":applyreason,
                                          @"useridtype":useridtype,
                                          @"userhighdegree":userhighdegree,
                                          @"companyproperty":companyproperty,
                                          @"companyhangye":companyhangye} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}


#pragma mark - 提报名加入企业或组织的申请
+(void)deletejoinmywithuid:(NSString *)uid result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/deletejoinmy"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"uid":uid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                                              NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
                                              
                                              if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
                                              {
                                                  
                                                  result(YES,resultDic);
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":[resultDic objectForKey:@"content"]});
                                              }
                                              
                                          } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                                              if ([error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"])
                                              {
                                                  NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:[error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"] options:NSJSONReadingMutableLeaves error:nil];
                                                  result(NO,@{@"message":[resultDic objectForKey:@"error"]});
                                              }
                                              else
                                              {
                                                  result(NO,@{@"message":@"网络连接失败"});
                                              }
                                          }];
}



#pragma mark - 个人加入的企业/组织列表
+(void)personalenrolllistwithpage:(NSString *)page search:(NSString *)search type:(NSString *)type result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/personalenrolllist"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager GET:requestUrl parameters:@{@"page":page,@"search":search,@"type":type} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 写入同一个用户的多个设备ID
+(void)devicewithid:(NSString *)deviceid device:(NSString *)device result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/jpush/deviceid"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }

    [manager POST:requestUrl parameters:@{@"deviceid":deviceid,@"device":device} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                   result(NO,@{@"message":@"网络连接失败"});

    }];
}

#pragma mark - 城市转
+(void)CITYset:(NSString *)city result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/setcity"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:@{@"cityname":city} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            [[NSUserDefaults standardUserDefaults]removeObjectForKey:@"cookie"];
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        result(NO,@{@"message":@"网络连接失败"});
        
    }];
    
}

#pragma mark - 个人电子档案
+(void)archivedetailTaskId:(NSString *)taskid Result:(result)result
{
    NSString * requestUrl = [NSString stringWithFormat:@"https://app.xrsquare.com/v180615/archiveDetail"];
    
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    manager.requestSerializer = [AFJSONRequestSerializer serializer];
    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
    
    if ([[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"])
    {
        [manager.requestSerializer setValue:[[NSUserDefaults standardUserDefaults]objectForKey:@"cookie"] forHTTPHeaderField:@"laravel_session"];
    }
    
    [manager GET:requestUrl parameters:@{@"taskid":taskid} progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableLeaves error:nil];
        
        if ([[resultDic objectForKey:@"status"]isEqualToNumber:@0])
        {
            result(YES,resultDic);
        }
        else
        {
            result(NO,@{@"message":[resultDic objectForKey:@"content"]});
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        if ([error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"])
        {
            NSDictionary * resultDic = [NSJSONSerialization JSONObjectWithData:[error.userInfo objectForKey:@"com.alamofire.serialization.response.error.data"] options:NSJSONReadingMutableLeaves error:nil];
            result(NO,@{@"message":[resultDic objectForKey:@"error"]});
        }
        else
        {
            result(NO,@{@"message":@"网络连接失败"});
        }
    }];
}


@end
